#import <Foundation/Foundation.h>
#import "Building.h"
#import "SFUEventSearchResponseDelegate.h"
#import "SFUEventSearchEngineDelegate.h"
#import "ParsingUtilities.h"
#import "EventManager.h"
#import "PointOfInterestCollection.h"

/**
 * Provides an interface in between the Mobile Assistance Subsystem and 
 * the Event Subsystem.
 * 
 * Allows for the interaction between responses and requests 
 *
 * @author      Justin Hollander
 * @version     0.5.0
 * @since       0.3.0
 * @see         SFUEventSearchEngineDelegate
 */
@interface MapSearchUtility : NSObject<SFUEventSearchEngineDelegate> {
	id<SFUEventSearchResponseDelegate> eventSearchDelegate; //used to update map when search completed
}

/**
 * Returns the shared map search utility.
 *
 * @return  the shared map search utility
 */
+ (MapSearchUtility*)sharedMapSearchUtility;

/**
 * Attempts to match search parameters to a building. 
 *
 * If a match is found the corresponding building is returned.
 *
 * @param searchText  search parameter that contains building name keyword
 * @return            matching buiding or null if no match
 */
+ (Building*)searchByBuilding:(NSString*)searchText;

/**
 * Keyword event search.
 *
 * @param searchText  the text used to search for events
 *
 */
- (void)searchByEvent:(NSString*)searchText;

/**
 * Sets the delegate for the event manager and calls the event manager
 * to search for events. 
 *
 * This leads to the viewing of the EventSearchViewer.
 * 
 * @param navController  the main application navigation controller 
 * @param delegate       the delegate for handling event search responses
 */
- (void)searchEventsWithNavController:(UINavigationController*)navController 
					   searchDelegate:(id<SFUEventSearchResponseDelegate>)delegate;

/**
 * Sets the delegate for handling event search response.
 * 
 * @param delegate  the delegate handling event search response
 */
- (void)setDelegate:(id<SFUEventSearchResponseDelegate>)delegate;

/**
 * Takes a category list and searches for points of interests.
 * 
 * @param categoryList  the list of categories used to search
 * @return              the points of interest found
 */
- (NSArray*)searchByPOI:(NSArray*)categoryList;

@end
